// yushuo
import http from '@/common/request.js'

// 登录
export const login = (data) => {
	return http("v1/sys/app/login", data)
}

// 根据登录获取的token 获取宇硕信息
export const getInfo = () => {
	return http("v1/sys/auth/getInfo", {}, true, {
		method: 'get'
	})
}

// 根据用户信息中的id 查询宇硕管理员详情
export const getYuShuoDetails = (id) => {
	return http("/v1/sys/user/getInfo", {}, true, {
		method: 'get'
	})
}

// app查询我的审批列表
export const getProcessList = (data) => {
	return http("v1/fl/process/request/app/getList", data, true, {
		method: 'get'
	})
}

// app 查询审批详情
export const getProcessDetails = data => {
	return http("v1/fl/process/request/get", data, true, {
		method: 'get'
	})
}

// 开启审批
export function setAuditStart(data) {
	return http('/v1/fl/process/request/startApproval', data)
}

// 消息列表  1经营 2购销 3收款 4 审核
export function noticeList(data) {
	return http('/v1/ms/message/notice/my/getList', data, true, {
		method: 'get'
	})
}

// 根据ID查询消息通知
export function getNoticeDetails(id) {
	return http('/v1/ms/message/notice/get', {
		id
	}, true, {
		method: 'get'
	})
}

// 消息已读
export function idRead(ids) {
	return http('/v1/ms/message/notice/read', ids)
}

// 修改密码
export const updateYsPassWord = (data) => {
	return http("/v1/sys/user/updPass", data)
}